import request from '@/utils/request'
import { getServicePath } from '@/api/baseUrlConfig'
const servicePath = getServicePath()
// 查询机构权限
export function getOrgRoleList (data) {
  return request({
    url: servicePath.userServer + '/permission/getOrgRoleList',
    method: 'post',
    data
  })
}
// 添加机构权限
export function addOrgRole (data) {
  return request({
    url: servicePath.userServer + '/permission/addOrgRole',
    headers: {
      showLoading: true
    },
    method: 'post',
    data
  })
}
// 查询机构权限人员
export function getOrgRoleUserList (data) {
  return request({
    url: servicePath.userServer + '/permission/getPermUserList',
    method: 'post',
    data
  })
}
// 查询机构权限人员
export function delOrgRole (params) {
  return request({
    url: servicePath.userServer + '/permission/delOrgRole',
    headers: {
      showLoading: true
    },
    method: 'get',
    params
  })
}
// 添加机构权限人员
export function addUserPerm (data) {
  return request({
    url: servicePath.userServer + '/permission/addPermUser',
    headers: {
      showLoading: true
    },
    method: 'post',
    data
  })
}
// 删除机构权限人员
export function delUserPerm (params) {
  return request({
    url: servicePath.userServer + '/permission/delPermUser',
    headers: {
      showLoading: true
    },
    method: 'post',
    params
  })
}
// 查询机构权限组织列表
export function getPermOrgList (data) {
  return request({
    url: servicePath.userServer + '/permission/getPermOrgList',
    method: 'post',
    data
  })
}
// 添加机构权限组织列表
export function addPermOrg (data) {
  return request({
    url: servicePath.userServer + '/permission/addPermOrg',
    headers: {
      showLoading: true
    },
    method: 'post',
    data
  })
}
// 删除机构权限人员
export function delPermOrg (params) {
  return request({
    url: servicePath.userServer + '/permission/delPermOrg',
    headers: {
      showLoading: true
    },
    method: 'post',
    params
  })
}
